<?php

/*========================================================================*\
|| ###################################################################### ||
|| # uCash Hack Version 3.9.0                                           # ||
|| # ----------------------------------------------------------------   # ||
|| # A Geeky Designs Production!                                        # ||
|| # Written by: Matthew Gordon                                         # ||
|| # This may not be redistributated without consent from Geeky Designs # ||
|| # Copyright 2009 Geeky Designs                                       # ||
|| ###################################################################### ||
\*========================================================================*/

function ucash_data_location($locationsetting) {
  // This function takes the setting "ucash_pointsfield" and turns it into usable data.
  $locationarray = explode('.', $locationsetting);
  foreach ($locationarray as $sub => $value) {
    if ($sub == 0 && $value == 'TP') {
      // Table prefix in use.
      $returnarray['tableprefix'] = true;
    } elseif (!isset($returnarray['table'])) {
      // This is the data for the name of the table. Check for the prefix and do magic.
      if ($returnarray['tableprefix'] == true) {
        $returnarray['table'] = TABLE_PREFIX . $value;
      } else {
        $returnarray['table'] = $value;
      }
    } else {
      // This is the field data. Nothing special.
      $returnarray['field'] = $value;
    }
  }
  
  return $returnarray;
}

function ucash_forum_options($setting) {
	if ($setting != '') {
		$settingarray = explode('::', $setting);
		$returnarray['thread'] = $settingarray[0];
		$returnarray['post'] = $settingarray[1];
		$returnarray['view'] = $settingarray[2];
	} else {
		$returnarray['thread'] = 1;
		$returnarray['post'] = 1;
		$returnarray['view'] = 1;
	}
	
	return $returnarray;
}

?>